from libavg import avg
import math

#***Game settings
RESOLUTION = avg.Point2D(1280, 800)

#***Item constants
ITEM_PLUS10 = 0
ITEM_SLOW = 1
ITEM_SPEED = 2
ITEM_NORMALIZE = 3
ITEM_DUALBALL = 4
ITEM_SWITCH = 5
ITEM_INVINCIBLE = 6
ITEM_FREEZE = 7
ITEM_METEOR = 8

ITEM_COUNT = 8
ITEM_SIZE_RADIUS = 20

#***Events constants
#**METEOR
METEOR_RADIUS = 35
METEOR_MAX_COUNT = 7
METEOR_MAX_SPEED = 6
#**BLACKHOLE
BLACKHOLE_RADIUS = 200

#***Ball constants
BALL_DEFAULT_SPEED = 9
BALL_FAST_SPEED = 14
BALL_SLOW_SPEED = 5

BALL_WALL_MINUS_LIVE = 5
BALL_DEFAULT_RADIUS = 15

#***Physics
METERS2PIXELS = 30.0
PIXELS2METERS = 1.0/30
TIMESTEP = 1.0/30
ITERATION_STEPS = 12
ITERATION_POSITION = 8
WALL_WALK_FIX = 1 / 250.0

#***Mathematical Constants
DEGREE2RAD = math.pi / 180
RAD2DEGREE = 180 / math.pi

#***Shuttle constants 
SHUTTLE_SIZE_DEFAULT = avg.Point2D(60, 250)

#***Cannon constants
CANNON_SIZE_DEFAULT = avg.Point2D(175, 77)

#***Collision points
#**Negatives
SHUTTLE_ENEMY_BALL_COLLISION = 25
SHUTTLE_ASTEROID_COLLISION = 25
#**Positives
SHUTTLE_ENEMY_BALL_COLLISION_PLUS = 25
SHUTTLE_DESTROY = 70
BRICK_BALL_HIT = 10
BRICK_BALL_DESTORY = 50
#**General configurations
SHUTTLE_LIVES = 3
SHUTTLE_LIVEPOINTS = 200

#***Sound constants
SHUTTLE_VOL = 0.3
STORY_VOL = 0.4
INGAME_VOL = 0.1
MENU_VOL = 0.3
EDITOR_VOL = 0.2
BALL_VOL = 0.05
METEOR_VOL = 0.1

#Brick constants
BRICK_COLORS = [ (0.0, 1.0, 0.0), (0.7, 1.0, 0.0), (1.0, 1.0, 0.0), (1.0, 0.7, 0.0), (1.0, 0.0, 0.0)]